package com.osce.system.service.impl;

import java.util.List;

import com.osce.common.core.entity.entity.SubjectManage;
import com.osce.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.osce.system.service.ISubjectManageService;
import com.osce.system.mapper.SubjectManageMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 科目管理Service业务层处理
 *
 * @author hdj
 * @since 2025-11-10
 */
@Service
public class SubjectManageServiceImpl extends ServiceImpl<SubjectManageMapper, SubjectManage> implements ISubjectManageService {


    /**
     * 查询科目管理
     *
     * @param id 科目管理主键
     * @return 科目管理
     */
    @Override
    public SubjectManage selectSubjectManageById(Long id) {
        return baseMapper.selectSubjectManageById(id);
    }

    /**
     * 查询科目管理列表
     *
     * @param subjectManage 科目管理
     * @return 科目管理
     */
    @Override
    public List<SubjectManage> selectSubjectManageList(SubjectManage subjectManage) {
        return baseMapper.selectSubjectManageList(subjectManage);
    }

    /**
     * 新增科目管理
     *
     * @param subjectManage 科目管理
     * @return 结果
     */
    @Override
    public int insertSubjectManage(SubjectManage subjectManage) {
                subjectManage.setCreateTime(DateUtils.getNowDate());
            return baseMapper.insertSubjectManage(subjectManage);
    }

    /**
     * 修改科目管理
     *
     * @param subjectManage 科目管理
     * @return 结果
     */
    @Override
    public int updateSubjectManage(SubjectManage subjectManage) {
                subjectManage.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateSubjectManage(subjectManage);
    }

    /**
     * 批量删除科目管理
     *
     * @param ids 需要删除的科目管理主键
     * @return 结果
     */
    @Override
    public int deleteSubjectManageByIds(Long[] ids) {
        return baseMapper.deleteSubjectManageByIds(ids);
    }

    /**
     * 删除科目管理信息
     *
     * @param id 科目管理主键
     * @return 结果
     */
    @Override
    public int deleteSubjectManageById(Long id) {
        return baseMapper.deleteSubjectManageById(id);
    }
}
